package layers.ants;

import layers.agents.AgentInterface;
import layers.physical.Crossroad;
import layers.physical.Path;
import layers.physical.Road;

public abstract class PathAnt extends Ant {


	private Path path;
	private long traveledDistance;
	private Road roadTraveled;

	public PathAnt(Crossroad crossroad, AgentInterface agent, Path path){
		super(crossroad, agent);
		this.path = path;
	}

	protected Path getPath() {
		return this.path;
	}

	protected void increaseTraveledDistance(long distance) {
		this.traveledDistance += distance;
	}

	protected long getLengthOfLastRoad() {
		if(this.roadTraveled != null)
			return this.roadTraveled.getLength();
		return 0;
	}

	protected long getTraveledDistance() {
		return this.traveledDistance;
	}

	protected void setRoadLastTraveled(Road road) {
		this.roadTraveled = road;
	}

	protected void setTraveledDistance(long traveledDistance) {
		this.traveledDistance = traveledDistance;
	}

	protected void setPath(Path path) {
		this.path = path;	
	}
}
